<template>
  <view class="tech-home">
    <!-- 渐变背景 -->
    <view class="page-bg"></view>
    
    <!-- 主标题 -->
    <view class="main-title">
      <image class="logo" src="/static/tedu-logo.png" mode="aspectFit"></image>
      <text class="title-text">新达内智慧充电云</text>
      <text class="subtitle-text">INTELLIGENT CHARGING CLOUD</text>
    </view>
    
    <!-- 现代风格充电桩 -->
    <view class="modern-charger">
      <!-- 充电桩主体 -->
      <view class="charger-body">
        <!-- 显示屏 -->
        <view class="display-panel">
          <view class="display-content">
            <view class="data-item">
              <text class="data-value">2.4k</text>
              <text class="data-label">接入充电桩</text>
            </view>
            <view class="data-item">
              <text class="data-value">98%</text>
              <text class="data-label">城市覆盖率</text>
            </view>
          </view>
        </view>
        
        <!-- 充电接口 -->
        <view class="charging-port">
          <view class="port-hole"></view>
        </view>
      </view>
      
      <!-- 底座 -->
      <view class="charger-base"></view>
    </view>
    
    <!-- 开始按钮 -->
    <view class="start-button" @click="goToStations">
      <text class="button-text">开始体验</text>
      <view class="button-icon">
        <image src="/static/right-arrow.png" mode="aspectFit"></image>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  methods: {
    goToStations() {
      uni.switchTab({
        url: '/pages/nearbyStation/nearbyStation'
      });
    }
  },
  onLoad() {
    setTimeout(() => {
      this.goToStations();
    }, 10000);
  }
}
</script>

<style lang="scss">
.tech-home {
  position: relative;
  height: 100vh;
  overflow: hidden;
  font-family: 'Helvetica Neue', Arial, sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 渐变背景 */
.page-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f0f5ff, #e6f0ff);
  z-index: -1;
}

/* 主标题 */
.main-title {
  margin-top: 15%;
  text-align: center;
  z-index: 2;
  
  .logo {
    width: 150px;
    height: 90px;
    margin-bottom: 15px;
  }
  
  .title-text {
    display: block;
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    letter-spacing: 2px;
  }
  
  .subtitle-text {
    display: block;
    font-size: 14px;
    color: #5a7ea8;
    letter-spacing: 2px;
    font-weight: 400;
  }
}

/* 现代充电桩 */
.modern-charger {
  width: 220px;
  height: 260px;
  margin-top: 40px;
  position: relative;
}

/* 充电桩主体 */
.charger-body {
  width: 180px;
  height: 200px;
  background: white;
  border-radius: 16px;
  margin: 0 auto;
  box-shadow: 
    0 10px 30px rgba(58, 95, 138, 0.1),
    0 4px 12px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  
  /* 蓝色装饰条 */
  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  }
}

/* 显示屏 */
.display-panel {
  width: 160px;
  height: 120px;
  background: #f8fafc;
  border-radius: 10px;
  margin: 20px auto 0;
  border: 1px solid #e1e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  
  .display-content {
    width: 90%;
    height: 90%;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
  }
}

/* 数据项 */
.data-item {
  text-align: center;
  
  .data-value {
    font-size: 28px;
    font-weight: 700;
    color: #007bff;
    margin-bottom: 5px;
    font-family: 'Arial', sans-serif;
  }
  
  .data-label {
    font-size: 12px;
    color: #5a7ea8;
    letter-spacing: 1px;
  }
}

/* 充电接口 */
.charging-port {
  width: 60px;
  height: 30px;
  background: #f0f5ff;
  border-radius: 15px 15px 0 0;
  margin: 15px auto 0;
  display: flex;
  justify-content: center;
  align-items: center;
  
  .port-hole {
    width: 40px;
    height: 16px;
    background: #d6e3ff;
    border-radius: 8px;
  }
}

/* 底座 */
.charger-base {
  width: 140px;
  height: 20px;
  background: white;
  border-radius: 0 0 10px 10px;
  margin: -2px auto 0;
  box-shadow: 
    0 5px 15px rgba(58, 95, 138, 0.1);
}

/* 开始按钮 */
.start-button {
  width: 180px;
  height: 50px;
  background: linear-gradient(90deg, #00d2ff, #3a7bd5);
  border-radius: 25px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 40px;
  box-shadow: 0 8px 20px rgba(0, 210, 255, 0.3);
  
  .button-text {
    color: white;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;
    margin-right: 8px;
  }
  
  .button-icon {
    width: 20px;
    height: 20px;
    
    image {
      width: 100%;
      height: 100%;
    }
  }
  
  &:active {
    transform: scale(0.98);
    opacity: 0.9;
  }
}
</style>